﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace Kokomo.Mirror.CliMetadata.DebugInfo
{
	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
	public struct DebugDatabaseHeader
	{
		static DebugDatabaseHeader()
		{
			CilDbSignature = "_ildb_signature\0";
			CliDbGuid = new Guid(new byte[] {
				0x7f, 0xff, 0xe7, 0xf1,
				0x3c, 0x42, 0x17, 0x41,
				0x8d, 0xa9, 0xc7, 0xa3,
				0xcd, 0x98, 0x8d, 0xf1
			});
		}
		public static readonly string CilDbSignature;
		public static readonly Guid CliDbGuid;

		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
		public string Signature;
		public Guid Guid;
		public int UserEntryPoint;
		public int CountOfMethods;
		public int CountOfScopes;
		public int CountOfVars;
		public int CountOfUsing;
		public int CountOfConstants;
		public int CountOfDocuments;
		public int CountOfSequencePoints;
		public int CountOfMiscBytes;
		public int CountOfStringBytes;
	}
}
